package comps.utils
{
	import controls.ConfigArea;
	
	import flash.geom.Rectangle;
	import mx.controls.Image;
	import flash.display.Shape;
	import flash.events.MouseEvent;

	public class MatchPoint extends Image
	{
		[Embed("circle_empty.gif")]
		private var source_empty:Class;
		[Embed("circle_target.gif")]
		private var source_target:Class;
		
		public var configArea:ConfigArea;				
		public var isTarget:Boolean=false;	
		
		private var dType:String="none"; //it is suggested to be either "input" or "output"	
		private var cword:String="none"; //the match code for matching peers, usually the type of the data
		public function MatchPoint(x:Number=0, y:Number=0, width:Number=8, height:Number=8)
		{
			//super(x, y, width, height);	
			super();
			this.source=source_empty;
		}
		public function becomeTarget():void{
			this.isTarget=true;
			this.source=source_target;
		}
		public function reset():void{
			this.isTarget=false;
			this.source=source_empty;
		}
		public function get dataType():String{			
			return this.dType;
		}
		public function set dataType(arg:String):void{			
			this.dType=arg;
		}
		public function get codeWord():String{
			return this.cword;
		}
		public function set codeWord(arg:String):void{
			this.cword=arg;	
		}			
	}
}